package com.simou.service;

import com.simou.dao.BillMapper;
import com.simou.pojo.Bill;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BillServiceImpl implements BillService{

    @Autowired
    BillMapper billMapper;

    @Override
    public List<Bill> getBillsByLimit(int start, int pageSize, String productName, long providerId,int isPayment) {
        return billMapper.getBillsByLimit(start, pageSize, productName, providerId,isPayment);
    }

    @Override
    public int getBillsCount(String productName, long providerId,int isPayment) {
        return billMapper.getBillsCount(productName, providerId,isPayment);
    }

    @Override
    public int addBill(Bill bill) {
        return billMapper.addBill(bill);
    }

    @Override
    public int updateBill(long id, Bill bill) {
        return billMapper.updateBill(id, bill);
    }

    @Override
    public int deleteBill(long id) {
        return billMapper.deleteBill(id);
    }
}
